﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class GroupTourController
    {
        public int InsertGroupTour(GroupTourInfo info)
        {
            return SQL.InsertGroupTour(info.GroupTourName, info.TourId);
        }
        public void UpdateGroupTour(GroupTourInfo info)
        {
            SQL.UpdateGroupTour(info.GroupTourId, info.GroupTourName, info.TourId);
        }
        public void DeleteGroupTour(GroupTourInfo info)
        {
            DeleteGroupTour(info.GroupTourId);
        }
        public void DeleteGroupTour(int groupTourId)
        {
            SQL.DeleteGroupTour(groupTourId);
        }
        public GroupTourInfo GetGroupTour(int groupTourId)
        {
            return CBO.FillObject<GroupTourInfo>(SQL.GetGroupTour(groupTourId));
        }
        public List<GroupTourInfo> ListGroupTour()
        {
            return CBO.FillCollection<GroupTourInfo>(SQL.ListGroupTour());
        }
        public DataTable SelectGroupTour()
        {
            return CBO.ConvertToDataTable(ListGroupTour(), typeof(GroupTourInfo));
        }
      }
}
